*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    font-weight: normal;
}

@font-face {
    font-family: SysFontM;
    src: url('../fonts/SourceHanSansCN-Medium.otf');
}

@font-face {
    font-family: SysFontR;
    src: url('../fonts/SourceHanSansCN-Regular.otf');
}

@font-face {
    font-family: DINpro;
    src: url('../fonts/DINPro-Regular.otf');
}

.SysFontM {
    font-family: SysFontM;
    font-weight: 600 !important;
}

.SysFontR {
    font-family: SysFontR;
}

.DINpro {
    font-family: DINpro;
}


body {
    color: var(--body-text-color);
    background: var(--bg1);
    font-family: SysFontR;
    font-size: 14px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    // css去除选中
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Chrome/Safari/Opera */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently supported by most modern browsers */
    cursor: url("../images/cursor/cursor.ico"), auto;
}

.Cursor_P,
svg {
    cursor:pointer;
}

.Cursor_Not {
    cursor: url("../images/cursor/not-allowed.ico"), auto;

    svg {
        cursor: url("../images/cursor/not-allowed.ico"), auto;
    }
}

// 单行文字溢出隐藏
.Text_Over {
    display: inline-block;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

// n行文字溢出隐藏：<div style="--rows: n;" class="Text_Over_Rows">多行文本</div>
.Text_Over_Rows {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: var(--rows);
    -webkit-box-orient: vertical;
}

.Disabled {
    opacity: 0.2;
    cursor: not-allowed !important;
}

// flex 垂直居中
.Disp_AC {
    display: flex;
    align-items: center;

    &.Bet {
        justify-content: space-between;
    }

    &.Cen {
        justify-content: center;
    }
}

// 文字居中样式
.Text_Center {
    text-align: center;
}

.Text_Left {
    text-align: left;
}

.Text_Right {
    text-align: right;
}


// 文字高亮
.Text_Light {
    color: var(--text-light);
}

// 文字主题色
.Text_Primary {
    color: var(--primary-color);
}

// 文字主题色
.Text_Body {
    color: var(--body-text-color);
}

// 高亮主题色
.Hover_P {
    &:hover {
        color: var(--primary-color) !important;
    }
}

// 下划线可查看高亮 
.Underline {
    text-decoration: underline;
    color: var(--primary-color);
    cursor: url("../images/cursor/pointer.ico"), auto;
}

// 成功绿色文字
.Success_Tip {
    color: var(--success)
}

// 成功绿色背景
.Success_bg {
    background: var(--success)
}

// 失败红色文字
.Error_Tip {
    color: var(--error)
}

// 失败红色背景
.Error_bg {
    background: var(--error)
}

// 硬件状态的状态图标
.statusStyle {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 6px;
}

.display_center {
    display: flex;
    align-items: center;
}

// 常用margin、padding
@for $i from 1 through 100 {
    .mt#{$i} {
        margin-top: (1px * $i);
    }

    .mb#{$i} {
        margin-bottom: (1px * $i);
    }

    .ml#{$i} {
        margin-left: (1px * $i);
    }

    .mr#{$i} {
        margin-right: (1px * $i);
    }

    .pt#{$i} {
        padding-top: (1px * $i);
    }

    .pb#{$i} {
        padding-bottom: (1px * $i);
    }

    .pl#{$i} {
        padding-left: (1px * $i);
    }

    .pr#{$i} {
        padding-right: (1px * $i);
    }
}

// 常用字体，行高大小
@for $i from 6 through 50 {
    .fs#{$i * 2} {
        font-size: (2px * $i);
        line-height: (2px * $i + 8px);
    }
}

// 常用border
@for $i from 1 through 5 {
    .br#{$i * 2} {
        border-radius: (2px * $i);
    }
}

/* 取消[type='number']的input的上下箭头 */
input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
}

input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
}

input[type="number"] {
    -moz-appearance: textfield;
}